package ejb.facades;

import entities.Trip;
import entities.User;
import entities.Vehicle;
import entities.location.Address;
import java.util.Date;
import java.util.List;
import javax.ejb.Local;

/**
 * Trabalho PD - 2014/2015
 *
 * @author a21210380 a21210392
 */
@Local
public interface TripFacadeLocal {

    void create(Trip trip);

    void edit(Trip trip);

    void remove(Trip trip);

    Trip find(Object id);

    List<Trip> findAll();

    List<Trip> findByVehicle(Vehicle vehicle);

    List<Trip> findRecent(int top);

    List<Trip> findRange(int[] range);

    int count();

    List<Trip> findAllTripsCreatedBy(User user);
    
    List<Trip> findUnfinishedTrips();

    List<Trip> searchTrips(Address start, Date date);

    List<Trip> searchTrips(Address end);

    List<Trip> searchTrips(Date date);

    List<Trip> searchTrips(Address start, Address end, Date date);

}
